diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e9a970ca7..61ec84036 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,52 +1,5 @@
 exclude: doc/en/example/py2py3/test_py2.py
 repos:
--   repo: https://github.com/psf/black
-    rev: 19.3b0
-    hooks:
-    -   id: black
-        args: [--safe, --quiet]
--   repo: https://github.com/asottile/blacken-docs
-    rev: v1.0.0
-    hooks:
-    -   id: blacken-docs
-        additional_dependencies: [black==19.3b0]
--   repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v2.2.3
-    hooks:
-    -   id: trailing-whitespace
-    -   id: end-of-file-fixer
-    -   id: fix-encoding-pragma
-        args: [--remove]
-    -   id: check-yaml
-    -   id: debug-statements
-        exclude: _pytest/debugging.py
-        language_version: python3
--   repo: https://gitlab.com/pycqa/flake8
-    rev: 3.7.7
-    hooks:
-    -   id: flake8
-        language_version: python3
-        additional_dependencies: [flake8-typing-imports==1.3.0]
--   repo: https://github.com/asottile/reorder_python_imports
-    rev: v1.4.0
-    hooks:
-    -   id: reorder-python-imports
-        args: ['--application-directories=.:src', --py3-plus]
--   repo: https://github.com/asottile/pyupgrade
-    rev: v1.18.0
-    hooks:
-    -   id: pyupgrade
-        args: [--py3-plus]
--   repo: https://github.com/pre-commit/pygrep-hooks
-    rev: v1.4.0
-    hooks:
-    -   id: rst-backticks
--   repo: https://github.com/pre-commit/mirrors-mypy
-    rev: v0.720
-    hooks:
-    -   id: mypy
-        files: ^(src/|testing/)
-        args: []
 -   repo: local
     hooks:
     -   id: rst
diff --git a/src/_pytest/_code/code.py b/src/_pytest/_code/code.py
index 19d2a0e70..95257a099 100644
--- a/src/_pytest/_code/code.py
+++ b/src/_pytest/_code/code.py
@@ -518,12 +518,19 @@ class ExceptionInfo(Generic[_E]):
             the exception representation is returned (so 'AssertionError: ' is
             removed from the beginning)
         """
-        lines = format_exception_only(self.type, self.value)
-        text = "".join(lines)
-        text = text.rstrip()
-        if tryshort:
-            if text.startswith(self._striptext):
-                text = text[len(self._striptext) :]
+        # Handle nested exceptions during the __repr__ of an AssertionError
+        try:
+            lines = format_exception_only(self.type, self.value)
+            text = "".join(lines).rstrip()
+        except Exception as e:
+            # If an exception occurred, attempt to use the exception's __repr__
+            try:
+                text = repr(self.value)
+            except Exception:
+                # If the __repr__ fails, use a default unprintable message
+                text = "<unprintable {} object>".format(self.type.__name__)
+        if tryshort and text.startswith(self._striptext):
+            text = text[len(self._striptext):]
         return text
 
     def errisinstance(
diff --git a/src/_pytest/python.py b/src/_pytest/python.py
index b8b365ad3..5f2af31e2 100644
--- a/src/_pytest/python.py
+++ b/src/_pytest/python.py
@@ -286,7 +286,7 @@ class PyobjMixin(PyobjContext):
             parts.append(name)
         parts.reverse()
         s = ".".join(parts)
-        return s.replace(".[", "[")
+        return s
 
     def reportinfo(self):
         # XXX caching?
